<template>
  <div id="" @click="toFriendDetail(eventItem.id)">
    <img :src="imgUrlLink(eventItem.headPortrait)" alt="" width="100%" height="120">
    <div class="con">
      <span>
        <em class="name">{{eventItem.nickName}}</em>
        <!-- 厦门 -->
      </span>
      <span class="job" v-if="eventItem.coachLev==0"><!-- 0银牌；1金牌 -->
        <img src="@/assets/indexImage/goldmedal_icon.png" alt="" width="10">
        银牌教练
      </span>
      <span class="job" v-else>
        <img src="@/assets/indexImage/goldmedal_icon.png" alt="" width="10">
        金牌教练
      </span>
    </div>
  </div>
</template>
<script>
export default {
  name: "",
  props: ['eventItem'],
  data: () => ({

  }),
  methods: {
    // 图片地址拼接
    imgUrlLink(imgUrl) {
      return this.$imgUrlLink(imgUrl);
    },
    // 跳转到详情页面
    toFriendDetail(userId) {
      this.$router.push({path:'/friendDetail', query:{userId:userId}});
    }
  }
}
</script>
<style lang="scss" scoped>
.con{
  @include flex;
  justify-content: space-between;
  margin-top: 6px;
  .name{
    margin-right: 10px;
  }
  .job{
    color: $yellowColor;
  }
}
</style>
